package main

import (
	"bilibili_converter/converter"
	"bilibili_converter/flags"
	"flag"
	"path/filepath"
)

var (
	source string
	target string
	num    uint
	help   bool
	wrap   bool
)

func init() {
	flag.StringVar(&source, "s", "", "哔哩哔哩视频缓存文件夹路径")
	flag.StringVar(&target, "t", "", "合并视频输出的文件夹路径")
	flag.UintVar(&num, "n", 2, "使用多少个核心数处理")
	flag.BoolVar(&help, "h", false, "帮助文档")
	flag.BoolVar(&wrap, "w", false, "缓存文件下面是否拥有多个视频缓存合集")
}

func main() {
	flag.Parse()
	if help {
		flags.Usage()
		return
	}
	tempPath, _ := filepath.Abs("temp")
	start(converter.Command{Num: num, Wrap: wrap, Source: source, Target: target, TempPath: tempPath})
}
